#ifndef _UTILS_SHAPE_HH_
#define _UTILS_SHAPE_HH_

#include <stdexcept>

#include <cxcore.h>
 
#include "PDModel.hh"


CvMat *projection_over_ST(const CvMat *shape, PDModel& pdm);

CvMat *projection_over_shape_base(const CvMat *sh, PDModel& pdm);
void remove_ST(CvMat *sh, CvMat *st_p);

CvMat * instantiate_shape(PDModel& pdm, 
			  const CvMat *p_params, const CvMat *st_params = NULL) throw (std::invalid_argument);

CvMat *robust_projection_over_ST(const CvMat *shape, PDModel& pdm, 
				 const CvMat *params, const CvMat *st_p0);
CvMat *robust_projection_over_shape_base(const CvMat *sh, PDModel& pdm, 
					 const CvMat *params_p0);

#endif
